<include file="Common/header" />
<!-- 顶部 -->     
<div id="middle">
    <include file="Common/menu" />
    <div class="right" id="mainFrame">
		<div class="right_cont">
			<ul class="breadcrumb">当前位置：
				<a href="javascript:void(0);">首页</a> <span class="divider">/</span>
				<a href="javascript:void(0);">门锁控制管理</a> <span class="divider">/</span>
				门锁电子钥匙分配记录
			</ul>
			<div class="title_right"><strong>按条件查询</strong></div>
			<form action="" method="POST" id="addfrom">
				<div style="width: 900px; margin:auto">
					<table class="table table-bordered">
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">房间号：</td>
							<td>
								<input type="text" name="room_number" id="room_number" class="span1-3" value="" />
								<input type="button" value="查询" class="btn btn-info roleSubmit" style="width:80px;" />
								<input type="button" value="导出Excel" class="btn btn-success" style="width:80px;" />
							</td>
						</tr>
						
					</table>
				</div>
			</form>
			<div class="title_right"><strong>记录列表</strong></div>
			<div id="ajaxDiv">
				<include file="Lockcmd/cmd_list" />
			</div>
		</div>     
    </div>
</div>
<script>
	$(document).ready(function(){
		$(".roleSubmit").on('click', function(){
			$.get('assigns.html', {room_number: $("#room_number").val(), ajax: 1}, function(data){
				$("#ajaxDiv").html(data);
			});
		});
		
		$(".btn-success").on('click', function(){
			location.href = "assignsexcel.html?room_number="+ $("#room_number").val();
		});
	});
</script>
<include file="Common/footer" />
